<?php
class Filial{
	private $id;
	private $nomefilial;

	public function __construct(){
		$this->id = NULL;
		$this->nomefilial = NULL;
	}

	public function get_id(){
		return $this->id;
	}
	public function get_nomefilial(){
		return $this->nomefilial;
	}
	
	
	public function carregar($id){
		$sql = "select * from Filial where id = '$id'";

		$con = db::conecta();
		$res = db::query($sql, $con);
		db::close($con);
		$Filial = db::fetch_array($res);

		$this->id = $Filial["id"];
		$this->nomefilial = $Filial["nomefilial"];
		
		return 1;
	}
}
?>
